# coding=utf-8
import sys, os
import cv2
import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(14,14),dpi=100)
print(cv2.__file__)
# #读取图片
# img = cv2.imread("QQ截图20210525223053.png")
# img_rgb = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
# print("img_rgb shape", img_rgb.shape)
# plt.subplot(1,3,1)
# plt.imshow(img_rgb)
# plt.title('RGB img')
#
# #转灰度图
# img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_RGB2GRAY)
# print("img_gray shape", img_gray.shape)
# plt.subplot(1,3,2)
# plt.imshow(img_gray, cmap = plt.cm.gray)
# plt.title('grey img')
#
# #转HSV
# img_hsv = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2HSV)
# print("img_hsv shape", img_hsv.shape)
# plt.subplot(1,3,3)
# plt.imshow(img_hsv)
# plt.title('hsv img')